package com.lianzheng.model;

/*
 *  Created on Mon Feb 27 21:49:05 CST 2012
 *
 */
import java.io.Serializable;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;

/**
 * TbDocArticleattach Base Java Bean
 * 
 * This class is the base class for the model
 * 
 */
 
public class TbDocArticleattach extends com.lianzheng.model.BaseObject implements Serializable {

    protected String attachid;
	protected String id;
	protected String attachurl;
	protected String attachname;
	protected com.lianzheng.model.TbDocArticleinfo tbDocArticleinfo;	


  /**
	*
	* Default Empty Constructor for class TbDocArticleattach
	*
	*/
	public TbDocArticleattach () {
		super();
	}
	
  /**
	*
	* Default All Fields Constructor for class TbDocArticleattach
	*
	*/
	public TbDocArticleattach (
		 String in_attachid
		,String in_id
		,String in_attachurl
		,String in_attachname
        ) {
		this.setAttachid(in_attachid);
		this.setId(in_id);
		this.setAttachurl(in_attachurl);
		this.setAttachname(in_attachname);
    }

	
	public com.lianzheng.model.TbDocArticleinfo getTbDocArticleinfo () {
	// instantiate a new association entity if it is null
		if (tbDocArticleinfo == null) {
			tbDocArticleinfo = new com.lianzheng.model.TbDocArticleinfo ();
		}
		return tbDocArticleinfo;
	}	
	
	public void setTbDocArticleinfo (com.lianzheng.model.TbDocArticleinfo in_tbDocArticleinfo) {
		this.tbDocArticleinfo = in_tbDocArticleinfo;
	}
    
  /**
	*
	* @return String
	*/
	public String getAttachid() {
		return this.attachid;
	}
	
  /**
	* Set the attachid
	*/	
	public void setAttachid(String aValue) {
		this.attachid = aValue;
	}	
  /**
	*
	* @return String
	*/
	public String getId() {
		return this.getTbDocArticleinfo().getId();
	}
	
  /**
	* Set the id
	*/	
	public void setId(String aValue) {
		this.getTbDocArticleinfo().setId(aValue);
	}	
  /**
	*
	* @return String
	*/
	public String getAttachurl() {
		return this.attachurl;
	}
	
  /**
	* Set the attachurl
	*/	
	public void setAttachurl(String aValue) {
		this.attachurl = aValue;
	}	
  /**
	*
	* @return String
	*/
	public String getAttachname() {
		return this.attachname;
	}
	
  /**
	* Set the attachname
	*/	
	public void setAttachname(String aValue) {
		this.attachname = aValue;
	}	
   /**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof TbDocArticleattach)) {
			return false;
		}
		TbDocArticleattach rhs = (TbDocArticleattach) object;
		return new EqualsBuilder()
				.append(this.attachid, rhs.attachid)
						.append(this.attachurl, rhs.attachurl)
				.append(this.attachname, rhs.attachname)
				.isEquals();
	}
	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-82280557, -700257973)
				.append(this.attachid) 
						.append(this.attachurl) 
				.append(this.attachname) 
				.toHashCode();
	}
	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this)
				.append("attachid", this.attachid) 
						.append("attachurl", this.attachurl) 
				.append("attachname", this.attachname) 
				.toString();
	}

	
}